package com.lemo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.lemo.client.UserFeignHystrixClient;
import com.lemo.model.Provider;

@RestController
public class FeignController {

	@Autowired
	private UserFeignHystrixClient userFeignClient;

	@GetMapping("feign/{id}")
	public Provider findByIdFeign(@PathVariable Long id) {
		Provider provider = this.userFeignClient.findByIdFeign(id);
		return provider;
	}
}
